import request from "@/utils/request";
let device = "policydecision";

export const getList = (params) => {
  return request({
    url: `/t/${device}/queryDecisionPageList`,
    data: params,
    method: "post",
  });
};
export const addList = (params) => {
  return request({
    url: `/t/${device}/add`,
    data: params,
    method: "post",
  });
};
export const editList = (params) => {
  return request({
    url: `/t/${device}/update`,
    data: params,
    method: "post",
  });
};
export const listdecisionPoint = (params) => {
  return request({
    url: `/t/policydecision/queryDecisionNameList`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};
export const listStrategy = (params) => {
  return request({
    url: `/t/policydecision/queryPolicyList`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    data: params,
    method: "post",
  });
};

export const delCurRow = (params) => {
  return request({
    url: `/t/${device}/delete`,
    data: params,
    method: "post",
  });
};
export const getPolicyTrust = (params) => {
  return request({
    url: `/t/${device}/queryPolicyTrust`,
    data: params,
    method: "post",
  });
};

export const importData = (params) => {
  return request({
    url: `/system/${device}/importData`,
    params: params,
    method: "post",
  });
};
export const dataExport = (params) => {
  return request({
    url: `/system/${device}/export`,
    params: params,
    method: "post",
  });
};
export const computerList = (params) => {
  return request({
    url: `/system/computer/list`,
    params: params,
    method: "get",
  });
};
export const asyc = (params) => {
  return request({
    url: `/system/${device}/sync`,
    params: params,
    method: "post",
  });
};

export const queryAreaList = (params) => {
  return request({
    url: `/system/edgeDevice/queryAreaList`,
    params: params,
    method: "get",
  });
};
export const updateStatus = (params) => {
  return request({
    url: `/system/edgeDevice/isEnable`,
    // headers: { 'content-type': 'application/x-www-form-urlencoded' },
    // data: params,
    method: "post",
  });
};
